<?php
include_once('common/header.php');	
if($AppUI->id <= 0 || !isset($_SERVER['HTTP_REFERER'])) {
	$this->_redirect(HOST_BACKEND);
}
$intType		= $objRequest->getParam('type', 0);
$intLanguage	= $objRequest->getParam('language', 0);
$intParentId	= $objRequest->getParam('parentid', 0);
$objCategory	= new Category();
if($intParentId == 0) {
	$arrCate	= $objCategory->getParent($intType);
} else {
	$arrCate	= $objCategory->getChild($intParentId);
}
$this->view->arrCate	= $arrCate;
$objView 		= Zend_Registry::get('objView');
$strData 		= $objView->fetch('ajax/category.tpl');
$arrJson 		= array('data'=>$strData);
echo $objRequest->getParam('callback') . '(' . Zend_Json::encode($arrJson) . ')';
exit();